<!-- 基本信息 -->
<div class="monitor-tab-div">
	<div class="m-panel">
		<div class="m-panel-title">
			<span>基本信息</span>
		</div>
		<div class="m-panel-body base-info-div">
			<form class="bs-example form-horizontal xs-form">
	            <div id="base_info_monitor_div">
	            	<div class="form-group">
	                    <label class="col-lg-2 control-label">监控器名称：</label>
	                    <label class="col-lg-4 control-label tl" data-id="monitorName"></label>
	                    <label class="col-lg-2 control-label">监控器类型：</label>
	                    <label class="col-lg-4 control-label tl" data-id="monitorTypeName"></label>
	                </div>
	            </div>
	            <div id="asset_info_monitor_div">
	            	<div class="form-group"></div>
	                <div class="form-group">
	                    <label class="col-lg-2 control-label">被监控资产名称：</label>
	                    <label class="col-lg-4 control-label tl" data-id="assetName"></label>
	                    <label class="col-lg-2 control-label">资产类型：</label>
	                    <label class="col-lg-4 control-label tl" data-id="assetTypeName"></label>
	                </div>
	                <div class="form-group">
	                    <label class="col-lg-2 control-label">IP：</label>
	                    <label class="col-lg-4 control-label tl" data-id="mainIp"></label>
	                    <label class="col-lg-2 control-label">管控域：</label>
	                    <label class="col-lg-4 control-label tl" data-id="securityDomainName"></label>
	                </div>
	                <div class="form-group">
	                    <label class="col-lg-2 control-label">操作系统：</label>
	                    <label class="col-lg-4 control-label tl" data-id="osTypeName"></label>
	                    <label class="col-lg-2 control-label" style="display: none;">物理位置：</label>
	                    <label class="col-lg-4 control-label tl" data-id="locationCbName" style="display: none;"></label>
	                </div>
	            </div>
	            <!-- 运行信息 -->
	            <div id="runtime_info_div">
	                <div class="form-group">
	                    <label class="col-lg-2 control-label">系统运行时间：</label>
	                    <label class="col-lg-4 control-label tl" data-id="systemRunTimes"></label>
	                    <label class="col-lg-2 control-label">风扇状态：</label>
	                    <label class="col-lg-4 control-label tl" data-id="fanStatus"></label>
	                </div>
	                <div class="form-group">
	                    <label class="col-lg-2 control-label">电源状态：</label>
	                    <label class="col-lg-4 control-label tl" data-id="powerStatus"></label>
	                    <label class="col-lg-2 control-label">电池状态：</label>
	                    <label class="col-lg-4 control-label tl" data-id="batterStatus"></label>
	                </div>
	                <div class="form-group">
	                    <label class="col-lg-2 control-label">温度状态：</label>
	                    <label class="col-lg-4 control-label tl" data-id="temperatureStatus"></label>
	                    <label class="col-lg-2 control-label"></label>
	                    <label class="col-lg-4 control-label tl" data-id=""></label>
	                </div>
	            </div>
	        </form>
	    </div>
	</div>
	<div class="box">
		<div class="box-item" style="width:100%">
			<!-- CPU使用率-->
			<div class="m-panel">
				<div class="m-panel-title">
					<span>CPU使用率</span>
				</div>
				<div class="m-panel-body">
					<div id="cpu_use_line_chart" class="monitor-chart"></div>
				</div>
			</div>
		</div>
	</div>
	<!-- 存储空间信息 -->
	<div class="m-panel">
		<div class="m-panel-title">
			<span>存储空间信息</span>
		</div>
		<div class="m-panel-body">
			<div id="page_info" class="table-div" style="height:300px;"></div>
		</div>
	</div>
	<!-- RAID信息 -->
	<div class="m-panel">
		<div class="m-panel-title">
			<span>RAID信息</span>
		</div>
		<div class="m-panel-body">
			<div id="disk_info" class="table-div"  style="height:300px;"></div>
		</div>
	</div>
	<!-- I/O信息 -->
    <div class="m-panel">
        <div class="m-panel-title">
            <span>I/O信息</span>
        </div>
        <div class="m-panel-body" id="io_info_chart_div">
            <div class="m-panel-body-card">
                <ul>
                    <li class="active" data-action="io_chart">网络I/O信息</li>
                    <li data-action="disk_chart">磁盘I/O信息</li>
                </ul>
            </div>
            <div class="table-div" id="io_info_chart_table" style="height:300px"></div>
        </div>
    </div>
</div>

<div class="monitor-tab-div" data-type="event"></div>


<script type="text/javascript">
$(document).ready(function (){
require(['/js/plugin/monitor/catagory/netapp.js'] ,function (netapp){

var urlParamObj = index_query_param_get()

view_init()

function view_init()
{
    urlParamObj.time = $("#query_time_label").text()
    urlParamObj.inputTime = $("#query_time_label").text()
    urlParamObj.edId = urlParamObj.assetId
    netapp.base_info(urlParamObj)
    netapp.runtime_info(urlParamObj)
    netapp.cpu_use_chart($("#cpu_use_line_chart") ,urlParamObj,"cpu")
    netapp.page_info_list($("#page_info") ,urlParamObj)
    netapp.disk_info_list($("#disk_info") ,urlParamObj)
    io_info_chart_render()
}

// I/O信息
function io_info_chart_render(){
    var el_ul = $("#io_info_chart_div").find("ul")
    el_ul.find("li").unbind("click")

    el_ul.find("li").click(function (){
        $(this).siblings().removeClass("active")
        $(this).addClass("active")
        netapp[$(this).attr("data-action")]($("#io_info_chart_table") ,urlParamObj)
    })

    netapp.io_chart($("#io_info_chart_table") ,urlParamObj)
}

window.index_monitor_init = function ()
{
    view_init()
}

});
});